#!/bin/sh

# make sure, that there's a subdirectory inside the Propellerhed Software ReWire location
if [ ! -e "/Library/Application Support/Propellerhead Software/ReWire" ]; then
	mkdir -p "/Library/Application Support/Propellerhead Software/ReWire"
fi

# create a link from the Propellerhead location to the Rewire.bundle
if [ -L "/Library/Application Support/Propellerhead Software/ReWire/The Grand 3ReWire.bundle" ]; then
	echo "/Library/Application Support/Propellerhead Software/ReWire/The Grand 3ReWire.bundle already exists."
else
	ln -s "/Library/Application Support/Steinberg/ReWire/The Grand 3ReWire.bundle" "/Library/Application Support/Propellerhead Software/ReWire/The Grand 3ReWire.bundle"
fi
